import ajax from './index'
import { IData } from './types/types'

// 登录
export const reqLogin = (data: any) => {
    return ajax<IData<{ 
        status: number
        token: string
    }>>({
        url: '/login',
        method: 'post',
        data
    })
}

// 测试mytable接口
export const reqTableData = (data: any) => {
    return ajax<{
        rows: any[]
        total: number
    }>({
        url: '/tbDefect/getdefectlist',
        method: 'post',
        data
    })
}